package cn.wh.ymcc.feignclients;

import cn.wh.ymcc.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "service-user",fallbackFactory = UserFeignClientFallBackFactory.class)
public interface UserFeignClient {
    @GetMapping("/loadByPhone/{phone}")
    User loadByPhone(@PathVariable("phone")String phone);


    @GetMapping("/loadByAll")
    List<User> loadByAll();
}
